package com.cyb.beta.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author chenyongbo
 * @date 2016/4/13.
 */
public abstract class ScheduleRunnable implements Runnable{
    private static final Logger logger = LoggerFactory
            .getLogger(ScheduleRunnable.class);
    private final String name;

    public ScheduleRunnable(String var1){
        this.name = var1;
    }

    public final void run(){
        try{
            this.doRun();
        } catch (Throwable throwable){
            logger.error(this.name, throwable);
        }

    }

    public abstract void doRun() throws Throwable;
}
